<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.14.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>DM-CtrlH7-BF-DevProgram: C:/Users/ASUS/Desktop/dm-ctrlH7-balance-9025test/Middlewares/Third_Party/FreeRTOS/Source/include/queue.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="50x5.png"/></td>
  <td id="projectalign">
   <div id="projectname">DM-CtrlH7-BF-DevProgram<span id="projectnumber">&#160;beta 0.1</span>
   </div>
   <div id="projectbrief">C.ONE Studio Damiao Development Board Framework</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.14.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search/",'.html');
</script>
<script type="text/javascript">
$(function() { codefold.init(); });
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search',true);
  $(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(function(){initNavTree('queue_8h_source.html','',''); });
</script>
<div id="container">
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="headertitle"><div class="title">queue.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * FreeRTOS Kernel V10.3.1</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> * Copyright (C) 2020 Amazon.com, Inc. or its affiliates.  All Rights Reserved.</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> *</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy of</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment"> * this software and associated documentation files (the &quot;Software&quot;), to deal in</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment"> * the Software without restriction, including without limitation the rights to</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment"> * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment"> * the Software, and to permit persons to whom the Software is furnished to do so,</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment"> * subject to the following conditions:</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment"> *</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="comment"> * copies or substantial portions of the Software.</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="comment"> *</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="comment"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="comment"> * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="comment"> * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="comment"> * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="comment"> * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="comment"> *</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="comment"> * http://www.FreeRTOS.org</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="comment"> * http://aws.amazon.com/freertos</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="comment"> *</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span><span class="comment"> * 1 tab == 4 spaces!</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="comment"> */</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span><span class="preprocessor">#ifndef QUEUE_H</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span><span class="preprocessor">#define QUEUE_H</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="preprocessor">#ifndef INC_FREERTOS_H</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span><span class="preprocessor">    #error &quot;include FreeRTOS.h&quot; must appear in source files before &quot;include queue.h&quot;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span><span class="preprocessor">#include &quot;task.h&quot;</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span><span class="keyword">struct </span><a class="code hl_struct" href="struct_queue_definition.html">QueueDefinition</a>; <span class="comment">/* Using old naming convention so as not to break kernel aware debuggers. */</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="struct_queue_definition.html">QueueDefinition</a> * QueueHandle_t;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="struct_queue_definition.html">QueueDefinition</a> * QueueSetHandle_t;</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="struct_queue_definition.html">QueueDefinition</a> * QueueSetMemberHandle_t;</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span><span class="comment">/* For internal use only. */</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span><span class="preprocessor">#define queueSEND_TO_BACK       ( ( BaseType_t ) 0 )</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span><span class="preprocessor">#define queueSEND_TO_FRONT      ( ( BaseType_t ) 1 )</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span><span class="preprocessor">#define queueOVERWRITE          ( ( BaseType_t ) 2 )</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span><span class="comment">/* For internal use only.  These definitions *must* match those in queue.c. */</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span><span class="preprocessor">#define queueQUEUE_TYPE_BASE                ( ( uint8_t ) 0U )</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span><span class="preprocessor">#define queueQUEUE_TYPE_SET                 ( ( uint8_t ) 0U )</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span><span class="preprocessor">#define queueQUEUE_TYPE_MUTEX               ( ( uint8_t ) 1U )</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span><span class="preprocessor">#define queueQUEUE_TYPE_COUNTING_SEMAPHORE  ( ( uint8_t ) 2U )</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span><span class="preprocessor">#define queueQUEUE_TYPE_BINARY_SEMAPHORE    ( ( uint8_t ) 3U )</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span><span class="preprocessor">#define queueQUEUE_TYPE_RECURSIVE_MUTEX     ( ( uint8_t ) 4U )</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span></div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span><span class="preprocessor">#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )</span></div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span><span class="preprocessor">    #define xQueueCreate( uxQueueLength, uxItemSize ) xQueueGenericCreate( ( uxQueueLength ), ( uxItemSize ), ( queueQUEUE_TYPE_BASE ) )</span></div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span></div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno">  231</span><span class="preprocessor">#if( configSUPPORT_STATIC_ALLOCATION == 1 )</span></div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno">  232</span><span class="preprocessor">    #define xQueueCreateStatic( uxQueueLength, uxItemSize, pucQueueStorage, pxQueueBuffer ) xQueueGenericCreateStatic( ( uxQueueLength ), ( uxItemSize ), ( pucQueueStorage ), ( pxQueueBuffer ), ( queueQUEUE_TYPE_BASE ) )</span></div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno">  233</span><span class="preprocessor">#endif </span><span class="comment">/* configSUPPORT_STATIC_ALLOCATION */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno">  234</span></div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno">  313</span><span class="preprocessor">#define xQueueSendToFront( xQueue, pvItemToQueue, xTicksToWait ) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_FRONT )</span></div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno">  314</span></div>
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno">  395</span><span class="preprocessor">#define xQueueSendToBack( xQueue, pvItemToQueue, xTicksToWait ) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )</span></div>
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno">  396</span></div>
<div class="line"><a id="l00479" name="l00479"></a><span class="lineno">  479</span><span class="preprocessor">#define xQueueSend( xQueue, pvItemToQueue, xTicksToWait ) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )</span></div>
<div class="line"><a id="l00480" name="l00480"></a><span class="lineno">  480</span></div>
<div class="line"><a id="l00562" name="l00562"></a><span class="lineno">  562</span><span class="preprocessor">#define xQueueOverwrite( xQueue, pvItemToQueue ) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), 0, queueOVERWRITE )</span></div>
<div class="line"><a id="l00563" name="l00563"></a><span class="lineno">  563</span> </div>
<div class="line"><a id="l00564" name="l00564"></a><span class="lineno">  564</span></div>
<div class="line"><a id="l00650" name="l00650"></a><span class="lineno">  650</span>BaseType_t xQueueGenericSend( QueueHandle_t xQueue, <span class="keyword">const</span> <span class="keywordtype">void</span> * <span class="keyword">const</span> pvItemToQueue, TickType_t xTicksToWait, <span class="keyword">const</span> BaseType_t xCopyPosition ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l00651" name="l00651"></a><span class="lineno">  651</span></div>
<div class="line"><a id="l00744" name="l00744"></a><span class="lineno">  744</span>BaseType_t xQueuePeek( QueueHandle_t xQueue, <span class="keywordtype">void</span> * <span class="keyword">const</span> pvBuffer, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l00745" name="l00745"></a><span class="lineno">  745</span></div>
<div class="line"><a id="l00777" name="l00777"></a><span class="lineno">  777</span>BaseType_t xQueuePeekFromISR( QueueHandle_t xQueue, <span class="keywordtype">void</span> * <span class="keyword">const</span> pvBuffer ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l00778" name="l00778"></a><span class="lineno">  778</span></div>
<div class="line"><a id="l00868" name="l00868"></a><span class="lineno">  868</span>BaseType_t xQueueReceive( QueueHandle_t xQueue, <span class="keywordtype">void</span> * <span class="keyword">const</span> pvBuffer, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l00869" name="l00869"></a><span class="lineno">  869</span></div>
<div class="line"><a id="l00883" name="l00883"></a><span class="lineno">  883</span>UBaseType_t uxQueueMessagesWaiting( <span class="keyword">const</span> QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l00884" name="l00884"></a><span class="lineno">  884</span></div>
<div class="line"><a id="l00900" name="l00900"></a><span class="lineno">  900</span>UBaseType_t uxQueueSpacesAvailable( <span class="keyword">const</span> QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l00901" name="l00901"></a><span class="lineno">  901</span></div>
<div class="line"><a id="l00914" name="l00914"></a><span class="lineno">  914</span><span class="keywordtype">void</span> vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l00915" name="l00915"></a><span class="lineno">  915</span></div>
<div class="line"><a id="l00984" name="l00984"></a><span class="lineno">  984</span><span class="preprocessor">#define xQueueSendToFrontFromISR( xQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_FRONT )</span></div>
<div class="line"><a id="l00985" name="l00985"></a><span class="lineno">  985</span> </div>
<div class="line"><a id="l00986" name="l00986"></a><span class="lineno">  986</span></div>
<div class="line"><a id="l01055" name="l01055"></a><span class="lineno"> 1055</span><span class="preprocessor">#define xQueueSendToBackFromISR( xQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )</span></div>
<div class="line"><a id="l01056" name="l01056"></a><span class="lineno"> 1056</span></div>
<div class="line"><a id="l01142" name="l01142"></a><span class="lineno"> 1142</span><span class="preprocessor">#define xQueueOverwriteFromISR( xQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueOVERWRITE )</span></div>
<div class="line"><a id="l01143" name="l01143"></a><span class="lineno"> 1143</span></div>
<div class="line"><a id="l01216" name="l01216"></a><span class="lineno"> 1216</span><span class="preprocessor">#define xQueueSendFromISR( xQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )</span></div>
<div class="line"><a id="l01217" name="l01217"></a><span class="lineno"> 1217</span></div>
<div class="line"><a id="l01295" name="l01295"></a><span class="lineno"> 1295</span>BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue, <span class="keyword">const</span> <span class="keywordtype">void</span> * <span class="keyword">const</span> pvItemToQueue, BaseType_t * <span class="keyword">const</span> pxHigherPriorityTaskWoken, <span class="keyword">const</span> BaseType_t xCopyPosition ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01296" name="l01296"></a><span class="lineno"> 1296</span>BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue, BaseType_t * <span class="keyword">const</span> pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01297" name="l01297"></a><span class="lineno"> 1297</span></div>
<div class="line"><a id="l01385" name="l01385"></a><span class="lineno"> 1385</span>BaseType_t xQueueReceiveFromISR( QueueHandle_t xQueue, <span class="keywordtype">void</span> * <span class="keyword">const</span> pvBuffer, BaseType_t * <span class="keyword">const</span> pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01386" name="l01386"></a><span class="lineno"> 1386</span> </div>
<div class="line"><a id="l01387" name="l01387"></a><span class="lineno"> 1387</span><span class="comment">/*</span></div>
<div class="line"><a id="l01388" name="l01388"></a><span class="lineno"> 1388</span><span class="comment"> * Utilities to query queues that are safe to use from an ISR.  These utilities</span></div>
<div class="line"><a id="l01389" name="l01389"></a><span class="lineno"> 1389</span><span class="comment"> * should be used only from witin an ISR, or within a critical section.</span></div>
<div class="line"><a id="l01390" name="l01390"></a><span class="lineno"> 1390</span><span class="comment"> */</span></div>
<div class="line"><a id="l01391" name="l01391"></a><span class="lineno"> 1391</span>BaseType_t xQueueIsQueueEmptyFromISR( <span class="keyword">const</span> QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01392" name="l01392"></a><span class="lineno"> 1392</span>BaseType_t xQueueIsQueueFullFromISR( <span class="keyword">const</span> QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01393" name="l01393"></a><span class="lineno"> 1393</span>UBaseType_t uxQueueMessagesWaitingFromISR( <span class="keyword">const</span> QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01394" name="l01394"></a><span class="lineno"> 1394</span> </div>
<div class="line"><a id="l01395" name="l01395"></a><span class="lineno"> 1395</span><span class="comment">/*</span></div>
<div class="line"><a id="l01396" name="l01396"></a><span class="lineno"> 1396</span><span class="comment"> * The functions defined above are for passing data to and from tasks.  The</span></div>
<div class="line"><a id="l01397" name="l01397"></a><span class="lineno"> 1397</span><span class="comment"> * functions below are the equivalents for passing data to and from</span></div>
<div class="line"><a id="l01398" name="l01398"></a><span class="lineno"> 1398</span><span class="comment"> * co-routines.</span></div>
<div class="line"><a id="l01399" name="l01399"></a><span class="lineno"> 1399</span><span class="comment"> *</span></div>
<div class="line"><a id="l01400" name="l01400"></a><span class="lineno"> 1400</span><span class="comment"> * These functions are called from the co-routine macro implementation and</span></div>
<div class="line"><a id="l01401" name="l01401"></a><span class="lineno"> 1401</span><span class="comment"> * should not be called directly from application code.  Instead use the macro</span></div>
<div class="line"><a id="l01402" name="l01402"></a><span class="lineno"> 1402</span><span class="comment"> * wrappers defined within croutine.h.</span></div>
<div class="line"><a id="l01403" name="l01403"></a><span class="lineno"> 1403</span><span class="comment"> */</span></div>
<div class="line"><a id="l01404" name="l01404"></a><span class="lineno"> 1404</span>BaseType_t xQueueCRSendFromISR( QueueHandle_t xQueue, <span class="keyword">const</span> <span class="keywordtype">void</span> *pvItemToQueue, BaseType_t xCoRoutinePreviouslyWoken );</div>
<div class="line"><a id="l01405" name="l01405"></a><span class="lineno"> 1405</span>BaseType_t xQueueCRReceiveFromISR( QueueHandle_t xQueue, <span class="keywordtype">void</span> *pvBuffer, BaseType_t *pxTaskWoken );</div>
<div class="line"><a id="l01406" name="l01406"></a><span class="lineno"> 1406</span>BaseType_t xQueueCRSend( QueueHandle_t xQueue, <span class="keyword">const</span> <span class="keywordtype">void</span> *pvItemToQueue, TickType_t xTicksToWait );</div>
<div class="line"><a id="l01407" name="l01407"></a><span class="lineno"> 1407</span>BaseType_t xQueueCRReceive( QueueHandle_t xQueue, <span class="keywordtype">void</span> *pvBuffer, TickType_t xTicksToWait );</div>
<div class="line"><a id="l01408" name="l01408"></a><span class="lineno"> 1408</span> </div>
<div class="line"><a id="l01409" name="l01409"></a><span class="lineno"> 1409</span><span class="comment">/*</span></div>
<div class="line"><a id="l01410" name="l01410"></a><span class="lineno"> 1410</span><span class="comment"> * For internal use only.  Use xSemaphoreCreateMutex(),</span></div>
<div class="line"><a id="l01411" name="l01411"></a><span class="lineno"> 1411</span><span class="comment"> * xSemaphoreCreateCounting() or xSemaphoreGetMutexHolder() instead of calling</span></div>
<div class="line"><a id="l01412" name="l01412"></a><span class="lineno"> 1412</span><span class="comment"> * these functions directly.</span></div>
<div class="line"><a id="l01413" name="l01413"></a><span class="lineno"> 1413</span><span class="comment"> */</span></div>
<div class="line"><a id="l01414" name="l01414"></a><span class="lineno"> 1414</span>QueueHandle_t xQueueCreateMutex( <span class="keyword">const</span> uint8_t ucQueueType ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01415" name="l01415"></a><span class="lineno"> 1415</span>QueueHandle_t xQueueCreateMutexStatic( <span class="keyword">const</span> uint8_t ucQueueType, StaticQueue_t *pxStaticQueue ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01416" name="l01416"></a><span class="lineno"> 1416</span>QueueHandle_t xQueueCreateCountingSemaphore( <span class="keyword">const</span> UBaseType_t uxMaxCount, <span class="keyword">const</span> UBaseType_t uxInitialCount ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01417" name="l01417"></a><span class="lineno"> 1417</span>QueueHandle_t xQueueCreateCountingSemaphoreStatic( <span class="keyword">const</span> UBaseType_t uxMaxCount, <span class="keyword">const</span> UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01418" name="l01418"></a><span class="lineno"> 1418</span>BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01419" name="l01419"></a><span class="lineno"> 1419</span>TaskHandle_t xQueueGetMutexHolder( QueueHandle_t xSemaphore ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01420" name="l01420"></a><span class="lineno"> 1420</span>TaskHandle_t xQueueGetMutexHolderFromISR( QueueHandle_t xSemaphore ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01421" name="l01421"></a><span class="lineno"> 1421</span> </div>
<div class="line"><a id="l01422" name="l01422"></a><span class="lineno"> 1422</span><span class="comment">/*</span></div>
<div class="line"><a id="l01423" name="l01423"></a><span class="lineno"> 1423</span><span class="comment"> * For internal use only.  Use xSemaphoreTakeMutexRecursive() or</span></div>
<div class="line"><a id="l01424" name="l01424"></a><span class="lineno"> 1424</span><span class="comment"> * xSemaphoreGiveMutexRecursive() instead of calling these functions directly.</span></div>
<div class="line"><a id="l01425" name="l01425"></a><span class="lineno"> 1425</span><span class="comment"> */</span></div>
<div class="line"><a id="l01426" name="l01426"></a><span class="lineno"> 1426</span>BaseType_t xQueueTakeMutexRecursive( QueueHandle_t xMutex, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01427" name="l01427"></a><span class="lineno"> 1427</span>BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01428" name="l01428"></a><span class="lineno"> 1428</span> </div>
<div class="line"><a id="l01429" name="l01429"></a><span class="lineno"> 1429</span><span class="comment">/*</span></div>
<div class="line"><a id="l01430" name="l01430"></a><span class="lineno"> 1430</span><span class="comment"> * Reset a queue back to its original empty state.  The return value is now</span></div>
<div class="line"><a id="l01431" name="l01431"></a><span class="lineno"> 1431</span><span class="comment"> * obsolete and is always set to pdPASS.</span></div>
<div class="line"><a id="l01432" name="l01432"></a><span class="lineno"> 1432</span><span class="comment"> */</span></div>
<div class="line"><a id="l01433" name="l01433"></a><span class="lineno"> 1433</span><span class="preprocessor">#define xQueueReset( xQueue ) xQueueGenericReset( xQueue, pdFALSE )</span></div>
<div class="line"><a id="l01434" name="l01434"></a><span class="lineno"> 1434</span> </div>
<div class="line"><a id="l01435" name="l01435"></a><span class="lineno"> 1435</span><span class="comment">/*</span></div>
<div class="line"><a id="l01436" name="l01436"></a><span class="lineno"> 1436</span><span class="comment"> * The registry is provided as a means for kernel aware debuggers to</span></div>
<div class="line"><a id="l01437" name="l01437"></a><span class="lineno"> 1437</span><span class="comment"> * locate queues, semaphores and mutexes.  Call vQueueAddToRegistry() add</span></div>
<div class="line"><a id="l01438" name="l01438"></a><span class="lineno"> 1438</span><span class="comment"> * a queue, semaphore or mutex handle to the registry if you want the handle</span></div>
<div class="line"><a id="l01439" name="l01439"></a><span class="lineno"> 1439</span><span class="comment"> * to be available to a kernel aware debugger.  If you are not using a kernel</span></div>
<div class="line"><a id="l01440" name="l01440"></a><span class="lineno"> 1440</span><span class="comment"> * aware debugger then this function can be ignored.</span></div>
<div class="line"><a id="l01441" name="l01441"></a><span class="lineno"> 1441</span><span class="comment"> *</span></div>
<div class="line"><a id="l01442" name="l01442"></a><span class="lineno"> 1442</span><span class="comment"> * configQUEUE_REGISTRY_SIZE defines the maximum number of handles the</span></div>
<div class="line"><a id="l01443" name="l01443"></a><span class="lineno"> 1443</span><span class="comment"> * registry can hold.  configQUEUE_REGISTRY_SIZE must be greater than 0</span></div>
<div class="line"><a id="l01444" name="l01444"></a><span class="lineno"> 1444</span><span class="comment"> * within FreeRTOSConfig.h for the registry to be available.  Its value</span></div>
<div class="line"><a id="l01445" name="l01445"></a><span class="lineno"> 1445</span><span class="comment"> * does not effect the number of queues, semaphores and mutexes that can be</span></div>
<div class="line"><a id="l01446" name="l01446"></a><span class="lineno"> 1446</span><span class="comment"> * created - just the number that the registry can hold.</span></div>
<div class="line"><a id="l01447" name="l01447"></a><span class="lineno"> 1447</span><span class="comment"> *</span></div>
<div class="line"><a id="l01448" name="l01448"></a><span class="lineno"> 1448</span><span class="comment"> * @param xQueue The handle of the queue being added to the registry.  This</span></div>
<div class="line"><a id="l01449" name="l01449"></a><span class="lineno"> 1449</span><span class="comment"> * is the handle returned by a call to xQueueCreate().  Semaphore and mutex</span></div>
<div class="line"><a id="l01450" name="l01450"></a><span class="lineno"> 1450</span><span class="comment"> * handles can also be passed in here.</span></div>
<div class="line"><a id="l01451" name="l01451"></a><span class="lineno"> 1451</span><span class="comment"> *</span></div>
<div class="line"><a id="l01452" name="l01452"></a><span class="lineno"> 1452</span><span class="comment"> * @param pcName The name to be associated with the handle.  This is the</span></div>
<div class="line"><a id="l01453" name="l01453"></a><span class="lineno"> 1453</span><span class="comment"> * name that the kernel aware debugger will display.  The queue registry only</span></div>
<div class="line"><a id="l01454" name="l01454"></a><span class="lineno"> 1454</span><span class="comment"> * stores a pointer to the string - so the string must be persistent (global or</span></div>
<div class="line"><a id="l01455" name="l01455"></a><span class="lineno"> 1455</span><span class="comment"> * preferably in ROM/Flash), not on the stack.</span></div>
<div class="line"><a id="l01456" name="l01456"></a><span class="lineno"> 1456</span><span class="comment"> */</span></div>
<div class="line"><a id="l01457" name="l01457"></a><span class="lineno"> 1457</span><span class="preprocessor">#if( configQUEUE_REGISTRY_SIZE &gt; 0 )</span></div>
<div class="line"><a id="l01458" name="l01458"></a><span class="lineno"> 1458</span>    <span class="keywordtype">void</span> vQueueAddToRegistry( QueueHandle_t xQueue, <span class="keyword">const</span> <span class="keywordtype">char</span> *pcQueueName ) PRIVILEGED_FUNCTION; <span class="comment">/*lint !e971 Unqualified char types are allowed for strings and single characters only. */</span></div>
<div class="line"><a id="l01459" name="l01459"></a><span class="lineno"> 1459</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l01460" name="l01460"></a><span class="lineno"> 1460</span> </div>
<div class="line"><a id="l01461" name="l01461"></a><span class="lineno"> 1461</span><span class="comment">/*</span></div>
<div class="line"><a id="l01462" name="l01462"></a><span class="lineno"> 1462</span><span class="comment"> * The registry is provided as a means for kernel aware debuggers to</span></div>
<div class="line"><a id="l01463" name="l01463"></a><span class="lineno"> 1463</span><span class="comment"> * locate queues, semaphores and mutexes.  Call vQueueAddToRegistry() add</span></div>
<div class="line"><a id="l01464" name="l01464"></a><span class="lineno"> 1464</span><span class="comment"> * a queue, semaphore or mutex handle to the registry if you want the handle</span></div>
<div class="line"><a id="l01465" name="l01465"></a><span class="lineno"> 1465</span><span class="comment"> * to be available to a kernel aware debugger, and vQueueUnregisterQueue() to</span></div>
<div class="line"><a id="l01466" name="l01466"></a><span class="lineno"> 1466</span><span class="comment"> * remove the queue, semaphore or mutex from the register.  If you are not using</span></div>
<div class="line"><a id="l01467" name="l01467"></a><span class="lineno"> 1467</span><span class="comment"> * a kernel aware debugger then this function can be ignored.</span></div>
<div class="line"><a id="l01468" name="l01468"></a><span class="lineno"> 1468</span><span class="comment"> *</span></div>
<div class="line"><a id="l01469" name="l01469"></a><span class="lineno"> 1469</span><span class="comment"> * @param xQueue The handle of the queue being removed from the registry.</span></div>
<div class="line"><a id="l01470" name="l01470"></a><span class="lineno"> 1470</span><span class="comment"> */</span></div>
<div class="line"><a id="l01471" name="l01471"></a><span class="lineno"> 1471</span><span class="preprocessor">#if( configQUEUE_REGISTRY_SIZE &gt; 0 )</span></div>
<div class="line"><a id="l01472" name="l01472"></a><span class="lineno"> 1472</span>    <span class="keywordtype">void</span> vQueueUnregisterQueue( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01473" name="l01473"></a><span class="lineno"> 1473</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l01474" name="l01474"></a><span class="lineno"> 1474</span> </div>
<div class="line"><a id="l01475" name="l01475"></a><span class="lineno"> 1475</span><span class="comment">/*</span></div>
<div class="line"><a id="l01476" name="l01476"></a><span class="lineno"> 1476</span><span class="comment"> * The queue registry is provided as a means for kernel aware debuggers to</span></div>
<div class="line"><a id="l01477" name="l01477"></a><span class="lineno"> 1477</span><span class="comment"> * locate queues, semaphores and mutexes.  Call pcQueueGetName() to look</span></div>
<div class="line"><a id="l01478" name="l01478"></a><span class="lineno"> 1478</span><span class="comment"> * up and return the name of a queue in the queue registry from the queue&#39;s</span></div>
<div class="line"><a id="l01479" name="l01479"></a><span class="lineno"> 1479</span><span class="comment"> * handle.</span></div>
<div class="line"><a id="l01480" name="l01480"></a><span class="lineno"> 1480</span><span class="comment"> *</span></div>
<div class="line"><a id="l01481" name="l01481"></a><span class="lineno"> 1481</span><span class="comment"> * @param xQueue The handle of the queue the name of which will be returned.</span></div>
<div class="line"><a id="l01482" name="l01482"></a><span class="lineno"> 1482</span><span class="comment"> * @return If the queue is in the registry then a pointer to the name of the</span></div>
<div class="line"><a id="l01483" name="l01483"></a><span class="lineno"> 1483</span><span class="comment"> * queue is returned.  If the queue is not in the registry then NULL is</span></div>
<div class="line"><a id="l01484" name="l01484"></a><span class="lineno"> 1484</span><span class="comment"> * returned.</span></div>
<div class="line"><a id="l01485" name="l01485"></a><span class="lineno"> 1485</span><span class="comment"> */</span></div>
<div class="line"><a id="l01486" name="l01486"></a><span class="lineno"> 1486</span><span class="preprocessor">#if( configQUEUE_REGISTRY_SIZE &gt; 0 )</span></div>
<div class="line"><a id="l01487" name="l01487"></a><span class="lineno"> 1487</span>    <span class="keyword">const</span> <span class="keywordtype">char</span> *pcQueueGetName( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION; <span class="comment">/*lint !e971 Unqualified char types are allowed for strings and single characters only. */</span></div>
<div class="line"><a id="l01488" name="l01488"></a><span class="lineno"> 1488</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l01489" name="l01489"></a><span class="lineno"> 1489</span> </div>
<div class="line"><a id="l01490" name="l01490"></a><span class="lineno"> 1490</span><span class="comment">/*</span></div>
<div class="line"><a id="l01491" name="l01491"></a><span class="lineno"> 1491</span><span class="comment"> * Generic version of the function used to creaet a queue using dynamic memory</span></div>
<div class="line"><a id="l01492" name="l01492"></a><span class="lineno"> 1492</span><span class="comment"> * allocation.  This is called by other functions and macros that create other</span></div>
<div class="line"><a id="l01493" name="l01493"></a><span class="lineno"> 1493</span><span class="comment"> * RTOS objects that use the queue structure as their base.</span></div>
<div class="line"><a id="l01494" name="l01494"></a><span class="lineno"> 1494</span><span class="comment"> */</span></div>
<div class="line"><a id="l01495" name="l01495"></a><span class="lineno"> 1495</span><span class="preprocessor">#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )</span></div>
<div class="line"><a id="l01496" name="l01496"></a><span class="lineno"> 1496</span>    QueueHandle_t xQueueGenericCreate( <span class="keyword">const</span> UBaseType_t uxQueueLength, <span class="keyword">const</span> UBaseType_t uxItemSize, <span class="keyword">const</span> uint8_t ucQueueType ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01497" name="l01497"></a><span class="lineno"> 1497</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l01498" name="l01498"></a><span class="lineno"> 1498</span> </div>
<div class="line"><a id="l01499" name="l01499"></a><span class="lineno"> 1499</span><span class="comment">/*</span></div>
<div class="line"><a id="l01500" name="l01500"></a><span class="lineno"> 1500</span><span class="comment"> * Generic version of the function used to creaet a queue using dynamic memory</span></div>
<div class="line"><a id="l01501" name="l01501"></a><span class="lineno"> 1501</span><span class="comment"> * allocation.  This is called by other functions and macros that create other</span></div>
<div class="line"><a id="l01502" name="l01502"></a><span class="lineno"> 1502</span><span class="comment"> * RTOS objects that use the queue structure as their base.</span></div>
<div class="line"><a id="l01503" name="l01503"></a><span class="lineno"> 1503</span><span class="comment"> */</span></div>
<div class="line"><a id="l01504" name="l01504"></a><span class="lineno"> 1504</span><span class="preprocessor">#if( configSUPPORT_STATIC_ALLOCATION == 1 )</span></div>
<div class="line"><a id="l01505" name="l01505"></a><span class="lineno"> 1505</span>    QueueHandle_t xQueueGenericCreateStatic( <span class="keyword">const</span> UBaseType_t uxQueueLength, <span class="keyword">const</span> UBaseType_t uxItemSize, uint8_t *pucQueueStorage, StaticQueue_t *pxStaticQueue, <span class="keyword">const</span> uint8_t ucQueueType ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01506" name="l01506"></a><span class="lineno"> 1506</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l01507" name="l01507"></a><span class="lineno"> 1507</span> </div>
<div class="line"><a id="l01508" name="l01508"></a><span class="lineno"> 1508</span><span class="comment">/*</span></div>
<div class="line"><a id="l01509" name="l01509"></a><span class="lineno"> 1509</span><span class="comment"> * Queue sets provide a mechanism to allow a task to block (pend) on a read</span></div>
<div class="line"><a id="l01510" name="l01510"></a><span class="lineno"> 1510</span><span class="comment"> * operation from multiple queues or semaphores simultaneously.</span></div>
<div class="line"><a id="l01511" name="l01511"></a><span class="lineno"> 1511</span><span class="comment"> *</span></div>
<div class="line"><a id="l01512" name="l01512"></a><span class="lineno"> 1512</span><span class="comment"> * See FreeRTOS/Source/Demo/Common/Minimal/QueueSet.c for an example using this</span></div>
<div class="line"><a id="l01513" name="l01513"></a><span class="lineno"> 1513</span><span class="comment"> * function.</span></div>
<div class="line"><a id="l01514" name="l01514"></a><span class="lineno"> 1514</span><span class="comment"> *</span></div>
<div class="line"><a id="l01515" name="l01515"></a><span class="lineno"> 1515</span><span class="comment"> * A queue set must be explicitly created using a call to xQueueCreateSet()</span></div>
<div class="line"><a id="l01516" name="l01516"></a><span class="lineno"> 1516</span><span class="comment"> * before it can be used.  Once created, standard FreeRTOS queues and semaphores</span></div>
<div class="line"><a id="l01517" name="l01517"></a><span class="lineno"> 1517</span><span class="comment"> * can be added to the set using calls to xQueueAddToSet().</span></div>
<div class="line"><a id="l01518" name="l01518"></a><span class="lineno"> 1518</span><span class="comment"> * xQueueSelectFromSet() is then used to determine which, if any, of the queues</span></div>
<div class="line"><a id="l01519" name="l01519"></a><span class="lineno"> 1519</span><span class="comment"> * or semaphores contained in the set is in a state where a queue read or</span></div>
<div class="line"><a id="l01520" name="l01520"></a><span class="lineno"> 1520</span><span class="comment"> * semaphore take operation would be successful.</span></div>
<div class="line"><a id="l01521" name="l01521"></a><span class="lineno"> 1521</span><span class="comment"> *</span></div>
<div class="line"><a id="l01522" name="l01522"></a><span class="lineno"> 1522</span><span class="comment"> * Note 1:  See the documentation on http://wwwFreeRTOS.org/RTOS-queue-sets.html</span></div>
<div class="line"><a id="l01523" name="l01523"></a><span class="lineno"> 1523</span><span class="comment"> * for reasons why queue sets are very rarely needed in practice as there are</span></div>
<div class="line"><a id="l01524" name="l01524"></a><span class="lineno"> 1524</span><span class="comment"> * simpler methods of blocking on multiple objects.</span></div>
<div class="line"><a id="l01525" name="l01525"></a><span class="lineno"> 1525</span><span class="comment"> *</span></div>
<div class="line"><a id="l01526" name="l01526"></a><span class="lineno"> 1526</span><span class="comment"> * Note 2:  Blocking on a queue set that contains a mutex will not cause the</span></div>
<div class="line"><a id="l01527" name="l01527"></a><span class="lineno"> 1527</span><span class="comment"> * mutex holder to inherit the priority of the blocked task.</span></div>
<div class="line"><a id="l01528" name="l01528"></a><span class="lineno"> 1528</span><span class="comment"> *</span></div>
<div class="line"><a id="l01529" name="l01529"></a><span class="lineno"> 1529</span><span class="comment"> * Note 3:  An additional 4 bytes of RAM is required for each space in a every</span></div>
<div class="line"><a id="l01530" name="l01530"></a><span class="lineno"> 1530</span><span class="comment"> * queue added to a queue set.  Therefore counting semaphores that have a high</span></div>
<div class="line"><a id="l01531" name="l01531"></a><span class="lineno"> 1531</span><span class="comment"> * maximum count value should not be added to a queue set.</span></div>
<div class="line"><a id="l01532" name="l01532"></a><span class="lineno"> 1532</span><span class="comment"> *</span></div>
<div class="line"><a id="l01533" name="l01533"></a><span class="lineno"> 1533</span><span class="comment"> * Note 4:  A receive (in the case of a queue) or take (in the case of a</span></div>
<div class="line"><a id="l01534" name="l01534"></a><span class="lineno"> 1534</span><span class="comment"> * semaphore) operation must not be performed on a member of a queue set unless</span></div>
<div class="line"><a id="l01535" name="l01535"></a><span class="lineno"> 1535</span><span class="comment"> * a call to xQueueSelectFromSet() has first returned a handle to that set member.</span></div>
<div class="line"><a id="l01536" name="l01536"></a><span class="lineno"> 1536</span><span class="comment"> *</span></div>
<div class="line"><a id="l01537" name="l01537"></a><span class="lineno"> 1537</span><span class="comment"> * @param uxEventQueueLength Queue sets store events that occur on</span></div>
<div class="line"><a id="l01538" name="l01538"></a><span class="lineno"> 1538</span><span class="comment"> * the queues and semaphores contained in the set.  uxEventQueueLength specifies</span></div>
<div class="line"><a id="l01539" name="l01539"></a><span class="lineno"> 1539</span><span class="comment"> * the maximum number of events that can be queued at once.  To be absolutely</span></div>
<div class="line"><a id="l01540" name="l01540"></a><span class="lineno"> 1540</span><span class="comment"> * certain that events are not lost uxEventQueueLength should be set to the</span></div>
<div class="line"><a id="l01541" name="l01541"></a><span class="lineno"> 1541</span><span class="comment"> * total sum of the length of the queues added to the set, where binary</span></div>
<div class="line"><a id="l01542" name="l01542"></a><span class="lineno"> 1542</span><span class="comment"> * semaphores and mutexes have a length of 1, and counting semaphores have a</span></div>
<div class="line"><a id="l01543" name="l01543"></a><span class="lineno"> 1543</span><span class="comment"> * length set by their maximum count value.  Examples:</span></div>
<div class="line"><a id="l01544" name="l01544"></a><span class="lineno"> 1544</span><span class="comment"> *  + If a queue set is to hold a queue of length 5, another queue of length 12,</span></div>
<div class="line"><a id="l01545" name="l01545"></a><span class="lineno"> 1545</span><span class="comment"> *    and a binary semaphore, then uxEventQueueLength should be set to</span></div>
<div class="line"><a id="l01546" name="l01546"></a><span class="lineno"> 1546</span><span class="comment"> *    (5 + 12 + 1), or 18.</span></div>
<div class="line"><a id="l01547" name="l01547"></a><span class="lineno"> 1547</span><span class="comment"> *  + If a queue set is to hold three binary semaphores then uxEventQueueLength</span></div>
<div class="line"><a id="l01548" name="l01548"></a><span class="lineno"> 1548</span><span class="comment"> *    should be set to (1 + 1 + 1 ), or 3.</span></div>
<div class="line"><a id="l01549" name="l01549"></a><span class="lineno"> 1549</span><span class="comment"> *  + If a queue set is to hold a counting semaphore that has a maximum count of</span></div>
<div class="line"><a id="l01550" name="l01550"></a><span class="lineno"> 1550</span><span class="comment"> *    5, and a counting semaphore that has a maximum count of 3, then</span></div>
<div class="line"><a id="l01551" name="l01551"></a><span class="lineno"> 1551</span><span class="comment"> *    uxEventQueueLength should be set to (5 + 3), or 8.</span></div>
<div class="line"><a id="l01552" name="l01552"></a><span class="lineno"> 1552</span><span class="comment"> *</span></div>
<div class="line"><a id="l01553" name="l01553"></a><span class="lineno"> 1553</span><span class="comment"> * @return If the queue set is created successfully then a handle to the created</span></div>
<div class="line"><a id="l01554" name="l01554"></a><span class="lineno"> 1554</span><span class="comment"> * queue set is returned.  Otherwise NULL is returned.</span></div>
<div class="line"><a id="l01555" name="l01555"></a><span class="lineno"> 1555</span><span class="comment"> */</span></div>
<div class="line"><a id="l01556" name="l01556"></a><span class="lineno"> 1556</span>QueueSetHandle_t xQueueCreateSet( <span class="keyword">const</span> UBaseType_t uxEventQueueLength ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01557" name="l01557"></a><span class="lineno"> 1557</span> </div>
<div class="line"><a id="l01558" name="l01558"></a><span class="lineno"> 1558</span><span class="comment">/*</span></div>
<div class="line"><a id="l01559" name="l01559"></a><span class="lineno"> 1559</span><span class="comment"> * Adds a queue or semaphore to a queue set that was previously created by a</span></div>
<div class="line"><a id="l01560" name="l01560"></a><span class="lineno"> 1560</span><span class="comment"> * call to xQueueCreateSet().</span></div>
<div class="line"><a id="l01561" name="l01561"></a><span class="lineno"> 1561</span><span class="comment"> *</span></div>
<div class="line"><a id="l01562" name="l01562"></a><span class="lineno"> 1562</span><span class="comment"> * See FreeRTOS/Source/Demo/Common/Minimal/QueueSet.c for an example using this</span></div>
<div class="line"><a id="l01563" name="l01563"></a><span class="lineno"> 1563</span><span class="comment"> * function.</span></div>
<div class="line"><a id="l01564" name="l01564"></a><span class="lineno"> 1564</span><span class="comment"> *</span></div>
<div class="line"><a id="l01565" name="l01565"></a><span class="lineno"> 1565</span><span class="comment"> * Note 1:  A receive (in the case of a queue) or take (in the case of a</span></div>
<div class="line"><a id="l01566" name="l01566"></a><span class="lineno"> 1566</span><span class="comment"> * semaphore) operation must not be performed on a member of a queue set unless</span></div>
<div class="line"><a id="l01567" name="l01567"></a><span class="lineno"> 1567</span><span class="comment"> * a call to xQueueSelectFromSet() has first returned a handle to that set member.</span></div>
<div class="line"><a id="l01568" name="l01568"></a><span class="lineno"> 1568</span><span class="comment"> *</span></div>
<div class="line"><a id="l01569" name="l01569"></a><span class="lineno"> 1569</span><span class="comment"> * @param xQueueOrSemaphore The handle of the queue or semaphore being added to</span></div>
<div class="line"><a id="l01570" name="l01570"></a><span class="lineno"> 1570</span><span class="comment"> * the queue set (cast to an QueueSetMemberHandle_t type).</span></div>
<div class="line"><a id="l01571" name="l01571"></a><span class="lineno"> 1571</span><span class="comment"> *</span></div>
<div class="line"><a id="l01572" name="l01572"></a><span class="lineno"> 1572</span><span class="comment"> * @param xQueueSet The handle of the queue set to which the queue or semaphore</span></div>
<div class="line"><a id="l01573" name="l01573"></a><span class="lineno"> 1573</span><span class="comment"> * is being added.</span></div>
<div class="line"><a id="l01574" name="l01574"></a><span class="lineno"> 1574</span><span class="comment"> *</span></div>
<div class="line"><a id="l01575" name="l01575"></a><span class="lineno"> 1575</span><span class="comment"> * @return If the queue or semaphore was successfully added to the queue set</span></div>
<div class="line"><a id="l01576" name="l01576"></a><span class="lineno"> 1576</span><span class="comment"> * then pdPASS is returned.  If the queue could not be successfully added to the</span></div>
<div class="line"><a id="l01577" name="l01577"></a><span class="lineno"> 1577</span><span class="comment"> * queue set because it is already a member of a different queue set then pdFAIL</span></div>
<div class="line"><a id="l01578" name="l01578"></a><span class="lineno"> 1578</span><span class="comment"> * is returned.</span></div>
<div class="line"><a id="l01579" name="l01579"></a><span class="lineno"> 1579</span><span class="comment"> */</span></div>
<div class="line"><a id="l01580" name="l01580"></a><span class="lineno"> 1580</span>BaseType_t xQueueAddToSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01581" name="l01581"></a><span class="lineno"> 1581</span> </div>
<div class="line"><a id="l01582" name="l01582"></a><span class="lineno"> 1582</span><span class="comment">/*</span></div>
<div class="line"><a id="l01583" name="l01583"></a><span class="lineno"> 1583</span><span class="comment"> * Removes a queue or semaphore from a queue set.  A queue or semaphore can only</span></div>
<div class="line"><a id="l01584" name="l01584"></a><span class="lineno"> 1584</span><span class="comment"> * be removed from a set if the queue or semaphore is empty.</span></div>
<div class="line"><a id="l01585" name="l01585"></a><span class="lineno"> 1585</span><span class="comment"> *</span></div>
<div class="line"><a id="l01586" name="l01586"></a><span class="lineno"> 1586</span><span class="comment"> * See FreeRTOS/Source/Demo/Common/Minimal/QueueSet.c for an example using this</span></div>
<div class="line"><a id="l01587" name="l01587"></a><span class="lineno"> 1587</span><span class="comment"> * function.</span></div>
<div class="line"><a id="l01588" name="l01588"></a><span class="lineno"> 1588</span><span class="comment"> *</span></div>
<div class="line"><a id="l01589" name="l01589"></a><span class="lineno"> 1589</span><span class="comment"> * @param xQueueOrSemaphore The handle of the queue or semaphore being removed</span></div>
<div class="line"><a id="l01590" name="l01590"></a><span class="lineno"> 1590</span><span class="comment"> * from the queue set (cast to an QueueSetMemberHandle_t type).</span></div>
<div class="line"><a id="l01591" name="l01591"></a><span class="lineno"> 1591</span><span class="comment"> *</span></div>
<div class="line"><a id="l01592" name="l01592"></a><span class="lineno"> 1592</span><span class="comment"> * @param xQueueSet The handle of the queue set in which the queue or semaphore</span></div>
<div class="line"><a id="l01593" name="l01593"></a><span class="lineno"> 1593</span><span class="comment"> * is included.</span></div>
<div class="line"><a id="l01594" name="l01594"></a><span class="lineno"> 1594</span><span class="comment"> *</span></div>
<div class="line"><a id="l01595" name="l01595"></a><span class="lineno"> 1595</span><span class="comment"> * @return If the queue or semaphore was successfully removed from the queue set</span></div>
<div class="line"><a id="l01596" name="l01596"></a><span class="lineno"> 1596</span><span class="comment"> * then pdPASS is returned.  If the queue was not in the queue set, or the</span></div>
<div class="line"><a id="l01597" name="l01597"></a><span class="lineno"> 1597</span><span class="comment"> * queue (or semaphore) was not empty, then pdFAIL is returned.</span></div>
<div class="line"><a id="l01598" name="l01598"></a><span class="lineno"> 1598</span><span class="comment"> */</span></div>
<div class="line"><a id="l01599" name="l01599"></a><span class="lineno"> 1599</span>BaseType_t xQueueRemoveFromSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01600" name="l01600"></a><span class="lineno"> 1600</span> </div>
<div class="line"><a id="l01601" name="l01601"></a><span class="lineno"> 1601</span><span class="comment">/*</span></div>
<div class="line"><a id="l01602" name="l01602"></a><span class="lineno"> 1602</span><span class="comment"> * xQueueSelectFromSet() selects from the members of a queue set a queue or</span></div>
<div class="line"><a id="l01603" name="l01603"></a><span class="lineno"> 1603</span><span class="comment"> * semaphore that either contains data (in the case of a queue) or is available</span></div>
<div class="line"><a id="l01604" name="l01604"></a><span class="lineno"> 1604</span><span class="comment"> * to take (in the case of a semaphore).  xQueueSelectFromSet() effectively</span></div>
<div class="line"><a id="l01605" name="l01605"></a><span class="lineno"> 1605</span><span class="comment"> * allows a task to block (pend) on a read operation on all the queues and</span></div>
<div class="line"><a id="l01606" name="l01606"></a><span class="lineno"> 1606</span><span class="comment"> * semaphores in a queue set simultaneously.</span></div>
<div class="line"><a id="l01607" name="l01607"></a><span class="lineno"> 1607</span><span class="comment"> *</span></div>
<div class="line"><a id="l01608" name="l01608"></a><span class="lineno"> 1608</span><span class="comment"> * See FreeRTOS/Source/Demo/Common/Minimal/QueueSet.c for an example using this</span></div>
<div class="line"><a id="l01609" name="l01609"></a><span class="lineno"> 1609</span><span class="comment"> * function.</span></div>
<div class="line"><a id="l01610" name="l01610"></a><span class="lineno"> 1610</span><span class="comment"> *</span></div>
<div class="line"><a id="l01611" name="l01611"></a><span class="lineno"> 1611</span><span class="comment"> * Note 1:  See the documentation on http://wwwFreeRTOS.org/RTOS-queue-sets.html</span></div>
<div class="line"><a id="l01612" name="l01612"></a><span class="lineno"> 1612</span><span class="comment"> * for reasons why queue sets are very rarely needed in practice as there are</span></div>
<div class="line"><a id="l01613" name="l01613"></a><span class="lineno"> 1613</span><span class="comment"> * simpler methods of blocking on multiple objects.</span></div>
<div class="line"><a id="l01614" name="l01614"></a><span class="lineno"> 1614</span><span class="comment"> *</span></div>
<div class="line"><a id="l01615" name="l01615"></a><span class="lineno"> 1615</span><span class="comment"> * Note 2:  Blocking on a queue set that contains a mutex will not cause the</span></div>
<div class="line"><a id="l01616" name="l01616"></a><span class="lineno"> 1616</span><span class="comment"> * mutex holder to inherit the priority of the blocked task.</span></div>
<div class="line"><a id="l01617" name="l01617"></a><span class="lineno"> 1617</span><span class="comment"> *</span></div>
<div class="line"><a id="l01618" name="l01618"></a><span class="lineno"> 1618</span><span class="comment"> * Note 3:  A receive (in the case of a queue) or take (in the case of a</span></div>
<div class="line"><a id="l01619" name="l01619"></a><span class="lineno"> 1619</span><span class="comment"> * semaphore) operation must not be performed on a member of a queue set unless</span></div>
<div class="line"><a id="l01620" name="l01620"></a><span class="lineno"> 1620</span><span class="comment"> * a call to xQueueSelectFromSet() has first returned a handle to that set member.</span></div>
<div class="line"><a id="l01621" name="l01621"></a><span class="lineno"> 1621</span><span class="comment"> *</span></div>
<div class="line"><a id="l01622" name="l01622"></a><span class="lineno"> 1622</span><span class="comment"> * @param xQueueSet The queue set on which the task will (potentially) block.</span></div>
<div class="line"><a id="l01623" name="l01623"></a><span class="lineno"> 1623</span><span class="comment"> *</span></div>
<div class="line"><a id="l01624" name="l01624"></a><span class="lineno"> 1624</span><span class="comment"> * @param xTicksToWait The maximum time, in ticks, that the calling task will</span></div>
<div class="line"><a id="l01625" name="l01625"></a><span class="lineno"> 1625</span><span class="comment"> * remain in the Blocked state (with other tasks executing) to wait for a member</span></div>
<div class="line"><a id="l01626" name="l01626"></a><span class="lineno"> 1626</span><span class="comment"> * of the queue set to be ready for a successful queue read or semaphore take</span></div>
<div class="line"><a id="l01627" name="l01627"></a><span class="lineno"> 1627</span><span class="comment"> * operation.</span></div>
<div class="line"><a id="l01628" name="l01628"></a><span class="lineno"> 1628</span><span class="comment"> *</span></div>
<div class="line"><a id="l01629" name="l01629"></a><span class="lineno"> 1629</span><span class="comment"> * @return xQueueSelectFromSet() will return the handle of a queue (cast to</span></div>
<div class="line"><a id="l01630" name="l01630"></a><span class="lineno"> 1630</span><span class="comment"> * a QueueSetMemberHandle_t type) contained in the queue set that contains data,</span></div>
<div class="line"><a id="l01631" name="l01631"></a><span class="lineno"> 1631</span><span class="comment"> * or the handle of a semaphore (cast to a QueueSetMemberHandle_t type) contained</span></div>
<div class="line"><a id="l01632" name="l01632"></a><span class="lineno"> 1632</span><span class="comment"> * in the queue set that is available, or NULL if no such queue or semaphore</span></div>
<div class="line"><a id="l01633" name="l01633"></a><span class="lineno"> 1633</span><span class="comment"> * exists before before the specified block time expires.</span></div>
<div class="line"><a id="l01634" name="l01634"></a><span class="lineno"> 1634</span><span class="comment"> */</span></div>
<div class="line"><a id="l01635" name="l01635"></a><span class="lineno"> 1635</span>QueueSetMemberHandle_t xQueueSelectFromSet( QueueSetHandle_t xQueueSet, <span class="keyword">const</span> TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01636" name="l01636"></a><span class="lineno"> 1636</span> </div>
<div class="line"><a id="l01637" name="l01637"></a><span class="lineno"> 1637</span><span class="comment">/*</span></div>
<div class="line"><a id="l01638" name="l01638"></a><span class="lineno"> 1638</span><span class="comment"> * A version of xQueueSelectFromSet() that can be used from an ISR.</span></div>
<div class="line"><a id="l01639" name="l01639"></a><span class="lineno"> 1639</span><span class="comment"> */</span></div>
<div class="line"><a id="l01640" name="l01640"></a><span class="lineno"> 1640</span>QueueSetMemberHandle_t xQueueSelectFromSetFromISR( QueueSetHandle_t xQueueSet ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01641" name="l01641"></a><span class="lineno"> 1641</span> </div>
<div class="line"><a id="l01642" name="l01642"></a><span class="lineno"> 1642</span><span class="comment">/* Not public API functions. */</span></div>
<div class="line"><a id="l01643" name="l01643"></a><span class="lineno"> 1643</span><span class="keywordtype">void</span> vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait, <span class="keyword">const</span> BaseType_t xWaitIndefinitely ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01644" name="l01644"></a><span class="lineno"> 1644</span>BaseType_t xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01645" name="l01645"></a><span class="lineno"> 1645</span><span class="keywordtype">void</span> vQueueSetQueueNumber( QueueHandle_t xQueue, UBaseType_t uxQueueNumber ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01646" name="l01646"></a><span class="lineno"> 1646</span>UBaseType_t uxQueueGetQueueNumber( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01647" name="l01647"></a><span class="lineno"> 1647</span>uint8_t ucQueueGetQueueType( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;</div>
<div class="line"><a id="l01648" name="l01648"></a><span class="lineno"> 1648</span> </div>
<div class="line"><a id="l01649" name="l01649"></a><span class="lineno"> 1649</span> </div>
<div class="line"><a id="l01650" name="l01650"></a><span class="lineno"> 1650</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l01651" name="l01651"></a><span class="lineno"> 1651</span>}</div>
<div class="line"><a id="l01652" name="l01652"></a><span class="lineno"> 1652</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l01653" name="l01653"></a><span class="lineno"> 1653</span> </div>
<div class="line"><a id="l01654" name="l01654"></a><span class="lineno"> 1654</span><span class="preprocessor">#endif </span><span class="comment">/* QUEUE_H */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l01655" name="l01655"></a><span class="lineno"> 1655</span> </div>
<div class="ttc" id="astruct_queue_definition_html"><div class="ttname"><a href="struct_queue_definition.html">QueueDefinition</a></div><div class="ttdef"><b>Definition</b> queue.c:98</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
</div><!-- container -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a href="dir_18d39804a75e1fcb1deadc3198692f5c.html">Middlewares</a></li><li class="navelem"><a href="dir_d908beb048a5c6f6b12f1f04de3a2254.html">Third_Party</a></li><li class="navelem"><a href="dir_ed087288308f45f95ae086e8a34c0403.html">FreeRTOS</a></li><li class="navelem"><a href="dir_1650b11e06b4f3f25e8347b77d99b4a3.html">Source</a></li><li class="navelem"><a href="dir_785597ed28c61d94000e8cb1328bf518.html">include</a></li><li class="navelem"><b>queue.h</b></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.14.0 </li>
  </ul>
</div>
</body>
</html>
